home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
EDITORS
/
HTMACROL
/
!HTMacroL
/
!RunImage
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1996-01-22
|
8KB
|
406 lines
HTML Macro Tool
By R. Goodwin
" at line ";
Task$="HTMacroL"
ouricon$="!htmacrol"
vno$="1.02"
setupwindows
quit
templen=4096
worklen=4096
main templen
mainwork worklen
info templen
infowork worklen
mainblock 256
block 256
"Wimp_Initialise",200,&4B534154,Task$
,taskhandle
"Wimp_OpenTemplate",,"HTMacroL:Templates"
"Wimp_LoadTemplate",,main,mainwork,mainwork+worklen,-1,"Main",0
"Wimp_LoadTemplate",,info,infowork,infowork+worklen,-1,"info",0
"Wimp_CloseTemplate"
quit=0
definemacros
setupwindows
"Wimp_CreateWindow",,main
mainhandle
"Wimp_CreateWindow",,info
infohandle
iconbar
openmain
!mainblock=mainhandle
"Wimp_GetWindowState",,mainblock
openwindow(mainblock)
"Wimp_Poll",0,block
reason
reason
2 :
openwindow(block)
3 :
closewindow(block)
6 :
mouseclick(block)
9 :
menuselect(block)
17,18 :
message(block)
openwindow(b)
"Wimp_OpenWindow",,b
closewindow(b)
"Wimp_CloseWindow",,b
"Wimp_CloseDown"
iconbar
!mainblock=-1
mainblock!4=0
mainblock!8=0
mainblock!12=68
mainblock!16=68
mainblock!20=&0000201A
$(mainblock+24)=ouricon$
"Wimp_CreateIcon",,mainblock
iconbarhandle
mouseclick(bl)
bl!12=-2
oniconbar
bl!12=mainhandle
clickonmain
oniconbar
(bl!8
4)<>0
bl!16=iconbarhandle
openmain
(bl!8
1)<>0
bl!16=iconbarhandle
openwinright
(bl!8
2)>0
bl!16=iconbarhandle
makeiconmenu(!bl-64,176)
clickonmain
(bl!8
4)=1
closewindow(mainblock)
temp$=""
bl!16
00 : temp$=mail$
01 : temp$=footer$
02 : temp$=header$
03 : temp$=image$
04 : temp$=cap$
05 : temp$=link$
06 : temp$=endlink$
07 : temp$=goname$
08 : temp$=aname$
09 : temp$=italic$
10 : temp$=noitalic$
11 : temp$=bold$
12 : temp$=nobold$
13 : temp$=quote$
14 : temp$=noquote$
15 : temp$=bigtext$
16 : temp$=nobigtext$
17 : temp$=h1on$
18 : temp$=h1off$
19 : temp$=h2on$
20 : temp$=h2off$
21 : temp$=h3on$
22 : temp$=h3off$
23 : temp$=h6on$
24 : temp$=h6off$
25 : temp$=break$
26 : temp$=paragraph$
27 : temp$=pound$
28 : temp$=copy$
29 : temp$=reg$
30 : temp$=trade$
31 : temp$=middot$
32 : temp$=half$
33 : temp$=quarter$
34 : temp$=quarter3$
35 : temp$=div$
36 : temp$=times$
37 : temp$=sup1$
38 : temp$=sup2$
39 : temp$=sup3$
40 : temp$=degree$
41 : temp$=plusminus$
42 : temp$=less$
43 : temp$=more$
44 : temp$=char1$
45 : temp$=char2$
46 : temp$=char3$
47 : temp$=rule$
48 : temp$=bar$
49 : temp$=address$
50 : temp$=center$
51 : temp$=nocenter$
push(temp$)
dispmess(A$)
getIS(3)
mainblock!8=0
mainblock!12=0
add=!(mainblock+28)
$(add)=A$
"Wimp_SetIconState",,mainblock
select(icon)
getIS(icon)
"=(?(mainblock+8+16+2)
32)<>0
getIS(icon)
mainblock!0=mainhandle
mainblock!4=icon
"Wimp_GetIconState",,mainblock
message(block)
block!16=0
quit=-1
makeiconmenu(X,Y)
$mainblock="HTMacroL"+
mainblock?12=7
mainblock?13=2
mainblock?14=7
mainblock?15=0
mainblock!16=128
mainblock!20=40
mainblock!24=0
mainblock!28=0
mainblock!32=infohandle
mainblock!36=&07009011
$(mainblock+40)="Info"
mainblock!52=128
mainblock!56=0
mainblock!60=&07009011
$(mainblock+64)="Quit"
"Wimp_CreateMenu",,mainblock,X,Y
menuselect(bl)
!bl=1
quit=-1
openwinright
w%,h%
!mainblock=mainhandle
"Wimp_GetWindowState",,mainblock
w%=mainblock!12-mainblock!4
h%=mainblock!16-mainblock!8
.mainblock!4=(
modevar(11)<<
modevar(4))-w%
.mainblock!8=(
modevar(12)<<
modevar(5))-h%
,mainblock!12=(
modevar(11)<<
modevar(4))
,mainblock!16=(
modevar(12)<<
modevar(5))
mainblock!20=0
mainblock!24=0
mainblock!28=-1
"Wimp_OpenWindow",,mainblock
modevar(var%)
"OS_ReadModeVariable",-1,var%
,,res%
=res%
definemacros
>header$="<html><head><title>no title</title></head><body>"
footer$="</body></html>"
address$=""
Tmail$="<a href="+
(34)+"mailto:mabel@argonet.co.uk"+
(34)+">Richard Goodwin</a>"
%image$="<img border=0 src="+
bar$=""
rule$="<P><HR><P>"
cap$=
(34)+">"
link$="<a href="+
endlink$="</a>"
goname$="<a href="+
(34)+"#"
aname$="<a name="+
center$="<center>"
nocenter$="</center>"
italic$="<I>"
noitalic$="</I>"
bold$="<B>"
nobold$="</B>"
quote$="<blockquote>"
noquote$="</blockquote>"
6bigtext$="<basefont size=""3""><font size=""+2"">"
nobigtext$="</font>"
h1on$="<center><h1>"
h1off$="</h1></center>"
h2on$="<h2>"
h2off$="<h2>"
h3on$="<h3>"
h3off$="</h3>"
h6on$="<h6>"
h6off$="</h6>"
break$="<br>"
paragraph$=
(10)+"<p>"+
pound$="£"
copy$="©"
reg$="®"
trade$="™"
middot$="·"
half$="½"
quarter$="¼"
quarter3$="¾"
div$="÷"
times$="×"
sup1$="¹"
sup2$="²"
sup3$="³"
degree$="°"
plusminus$="±"
less$="<"
more$="&RT;"
char1$="é"
char2$="á"
char3$="Ø"
loadmacros
loadmacros
LOCAL ERROR: ON ERROR CLOSE#0:ENDPROC
"OS_File",5,"HTMacroL:User"
check%
check%=0
"HTMacroL:User"
var$=""
char=
char>96
char<123
char-=32
char<>
char<>10
char<>13
char<>32
char<>0
var$=var$+
(char)
char=
macro$=""
char=
char=92
macro$=macro$+
char<>10
char<>13
char<>
macro$=macro$+
(char)
char=10
char=13
var$
"HEAD":
header$=macro$
"FOOT":
footer$=macro$
"ADDR":
address$=macro$
"MAIL":
mail$=macro$
"IMAGE":
image$=macro$
"BAR":
bar$=macro$
"RULE":
rule$=macro$
"CAP":
cap$=macro$
"LINK":
link$=macro$
"ENDLK":
endlink$=macro$
"GONAME":
goname$=macro$
"CENTER":
center$=macro$
"NOCENT":
nocenter$=macro$
"NAME":
aname$=macro$
"ITAL":
italic$=macro$
"NOITAL":
noitalic$=macro$
"BOLD":
bold$=macro$
"NOBOLD":
nobold$=macro$
"QUOTE":
quote$=macro$
"NOQUOTE":
noquote$=macro$
"BIGTEXT":
bigtext$=macro$
"NOBIG":
nobigtext$=macro$
"H1ON":
h1on$=macro$
"NOH1":
h1off$=macro$
"H2ON":
h2on$=macro$
"NOH2":
h2off$=macro$
"H3ON":
h3on$=macro$
"NOH3":
h3off$=macro$
"H6ON":
h6on$=macro$
"NOH6":
h6off$=macro$
"BREAK":
break$=macro$
"PARA":
paragraph$=macro$
"POUND":
pound$=macro$
"COPY":
copy$=macro$
"REG":
reg$=macro$
"TRADE":
trade$=macro$
"DOT":
middot$=macro$
"HALF":
half$=macro$
"1/4":
quarter$=macro$
"3/4":
quarter3$=macro$
"DIV":
div$=macro$
"TIMES":
times$=macro$
"SUP1":
sup1$=macro$
"SUP2":
sup2$=macro$
"SUP3":
sup3$=macro$
"DEG":
degree$=macro$
"+/-":
plusminus$=macro$
"LESS":
less$=macro$
"MORE":
more$=macro$
"CHAR1":
char1$=macro$
"CHAR2":
char2$=macro$
"CHAR3":
char3$=macro$
push(temp$)
(temp$)=0
X=1
(temp$)
character=
temp$,X,1))
"OS_Byte",138,0,character